
package com.sunwayhorizo.health.common;

import java.util.ArrayList;
import java.util.List;


/**
 * This class contains all the constants that has been used inside the 
 * java files in this project.
 */
public class BusinessConstants 
{
   //此常量类渐渐废弃，所有内容转向 HL7 vocabulary。
  /********************************************Entity constants*********************************************************************/
	
	  /***************************Entity NamesUse***************************************/
	  //废弃，换成Vocabulary 的 EntityNameUse。
	  public static final String USECODE_EN_LEGAL                 = "L";     //ref: CL_EN_USE 法律名(常规使用)
	  public static final String USECODE_EN_UNKNOWN               = "UNK";   //ref: CL_EN_USE
	  public static final String USECODE_EN_ALIAS                 = "AL";    //ref: CL_EN_USE
	  public static final String USECODE_EN_RELIGIOUS             = "R";     //ref: CL_EN_USE 宗教名
	  public static final String USECODE_EN_LICENSE               = "C";     //ref: CL_EN_USE 许可证上所记录的，记录，证书等（仅当从法律的名称不同）法律名
	  public static final String USECODE_EN_INDIGENOUS_TRIBAL     = "I";     //土名，小名
	  public static final String USECODE_EN_PSEUDONYM             = "P";     //笔名
	  public static final String USECODE_EN_ARTIST_STAGE          = "A";    //包括作家的笔名，艺名等艺名
	  public static final String USECODE_EN_SEARCH                = "SRCH";  //一个名称用于在搜索或配套使用，如简码。
	  public static final String USECODE_EN_PHONETIC              = "PHON";  //一个名字拼写发音
	  public static final String USECODE_EN_SOUNDEX               = "SNDX";  //一个名字拼写根据Soundex算法，如五笔码。
	  public static final String USECODE_EN_ALPHABETIC            = "ABC";   //拼音ABC 转录名称字母（日语：罗马字）
	  public static final String USECODE_EN_SYLLABIC              = "SYL";   //音节的音节转录的名称（例如，日文假名，朝鲜文）
	  public static final String USECODE_EN_IDEOGRAPHIC            = "IDE";  //例如，日文汉字，汉字
	  
	  /***************************Entity AddrUses、TelUses ************************/
	  public static final String ADDRESS_TEL_HOMEADRESS			  ="H";   //家庭通信地址
	  public static final String ADDRESS_TEL_PRIMARYHOME		  ="HP";
	  public static final String ADDRESS_TEL_VACATIONHOME		  ="HV";
	  public static final String ADDRESS_TEL_WORKPLACE  		  ="WP";  //工作通信地址
	  public static final String ADDRESS_TEL_DIRECT				  ="DIR";
	  public static final String ADDRESS_TEL_PUBLIC				  ="PUB";   //公共通信地址
	  public static final String ADDRESS_TEL_BADADDRESS			  ="BAD";
	  public static final String ADDRESS_TEL_TEMPORARYADDRESS     ="TMP"; //临时通信地址
	  public static final String ADDRESS_TEL_ANSWERING            ="AS";
	  public static final String ADDRESS_TEL_EMERGENCYCONTACT     ="EC";
	  public static final String ADDRESS_TEL_MOBILECONTACT        ="MC";   //移动联系
	  public static final String ADDRESS_TEL_PAGER		          ="PG";   //呼叫器
    
	  /***************************Entity TelUse***************************************/
	  public static final String TELCOM_PHONE          = "电话";  
	  public static final String MOBILE_PHONE          = "手机";  
	  public static final String TELCOM_FAX            = "传真";  
	  public static final String TELCOM_EMAIL          = "邮箱";  
	  public static final String TELCOM_URI            = "URI";
	  
	  /***************************Entity OrgNameuse ************************/
	  public static final String USECODE_ORG_LONGNAME         = "L";
	  public static final String USECODE_ORG_SHORTNAME        = "AB";
	  public static final String USECODE_ORG_ADDRESS          = "单位地址";
	  

	  /***************************Entity PlaceNameuse ************************/
	  public static final String USECODE_PLC_LONGNAME         = "L";
	  public static final String USECODE_PLC_SHORTNAME        = "AB";
	  

	  /***************************Entity Nname partType ************************/
	//  public static final String NAMEPART_ENXP_GIVEN          = "GIV";  //ref: CL_ENXP_PART_TYPE
	//  public static final String NAMEPART_ENXP_FAMILY         = "FAM";  //ref: CL_ENXP_PART_TYPE
	//  public static final String NAMEPART_ENXP_PREFIX         = "PFX";  //ref: CL_ENXP_PART_TYPE
	//  public static final String NAMEPART_ENXP_SUFFIX         = "SFX";  //ref: CL_ENXP_PART_TYPE
	//  public static final String NAMEPART_ENXP_DELIMITER      = "DEL";  //ref: CL_ENXP_PART_TYPE
	  
	  public static final String NAMEPART_ENXP_GIVEN          = "名";  //ref: CL_ENXP_PART_TYPE
	  public static final String NAMEPART_ENXP_FAMILY         = "姓"; //ref: CL_ENXP_PART_TYPE
	  public static final String NAMEPART_ENXP_NAME           = "姓名"; //ref: CL_ENXP_PART_TYPE
	  public static final String NAMEPART_ENXP_PING           = "拼音名"; //ref: CL_ENXP_PART_TYPE
	  public static final String NAMEPART_ENXP_SOUNDEX        = "五笔码"; //ref: CL_ENXP_PART_TYPE
	  public static final String NAMEPART_ENXP_SEARCH         = "简码"; //ref: CL_ENXP_PART_TYPE
	  public static final String NAMEPART_ENXP_PREFIX         = "PFX";  //ref: CL_ENXP_PART_TYPE
	  public static final String NAMEPART_ENXP_SUFFIX         = "SFX";  //ref: CL_ENXP_PART_TYPE
	  public static final String NAMEPART_ENXP_DELIMITER      = "DEL";  //ref: CL_ENXP_PART_TYPE
	 
	  /***************************Entity Address PartType ************************/
	  public static final String BUILDING_NUMBER  = "楼号";
	  public static final String UNIT             = "单元";
	  public static final String STREET_NAME      = "路";
	  public static final String STREET_ADDR_LINE = "SAL";
	  public static final String POST_BOX         = "POB";
	  public static final String DISTRIC          = "区";
	  public static final String CITY             = "城市";
	  public static final String ZIPCODE          = "邮编";
	  public static final String PROVINCE         = "省";
	  public static final String COUNTRY          = "国家";
	  public static final String USECODE_HOME     = "H";    //ref CL_AD_USE
	  public static final String USECODE_WORK     = "WP";   //ref CL_AD_USE
	  public static final String USECODE_POSTAL   = "PST";  //ref CL_AD_USE
	  public static final String HOMEADDRS        = "家庭地址";
	  

	  
	  /***************************************Dic constants*************************/
	  public static final String NAMEPART_DIC_SEX              = "AdministrativeGender";  //ref: dic 性别英文代码
	  public static final String NAMEPART_DIC_NATIONALITY      = "Country&Region";  //ref: dic     国籍英文代码
	  public static final String NAMEPART_DIC_MINGZU           = "Nation";  //ref: dic  民族英文代码
	  public static final String NAMEPART_DIC_JIGUAN           = "AdministrativeDivesions";  //ref: dic  籍贯英文代码
	  public static final String NAMEPART_DIC_IDENTITY         = "EmployeeState";  //ref: dic 身份英文代码
	  public static final String NAMEPART_DIC_WORK             = "OccupationClassification";  //ref: dic 职业英文代码
	  public static final String NAMEPART_DIC_YIBAOTYPE        = "MedicareType";         //ref: dic
	  public static final String NAMEPART_DIC_PAPERSTYPE       = "DocumentType";         //ref: dic
	  public static final String NAMEPART_DIC_HOMETYPE         = "FamilyRelationship";  //ref: dic
	  public static final String NAMEPART_DIC_DUTIES           = "Duty";              //职务
	  public static final String NAMEPART_DIC_TITLE            = "Title";              //职称
		public static final String NAMEPART_DIC_MARRYFLAG = "MaritalStatus"; // 婚史
	  public static final String NAMEPART_DIC_CONCEPT_CODE     = "18";              //就诊卡
	  public static final String NAME_DIC_CONCEPT_CODE         = "01";              //居民身份证
	  
	  public static final String NAMEPART_DIC_DEPARTTYPE       = "DepartType";  //ref: dic 科室类别
	  public static final String NAMEPART_DIC_DEPTATTR       = "DeptAttr";  //ref: dic 科室类型
	  
	  
	 
	  //床位数据字典
	  public static final String DIC_BEDTYPE                   = "BedType";        //床位类型
	  public static final String DIC_BEDLEVEL                  = "BedLevel";       //床位等级
	  public static final String DIC_BEDAPPROVEDTYPE           = "BedApprovedType";//床位编制类型
	  public static final String DIC_BEDSTATUS                 = "BedStatus";       //床位状态(未用)
	  public static final String DIC_BEDSTATUS_EMPTY           = "0";               //床位空
	  public static final String DIC_BEDSTATUS_NOTEMPTY        = "1";               //床位非空
	  
	  public static final String PERMISSION_NODE               = "node";            //节点
	  public static final String PERMISSION_MODULE             = "module";          //模块
	  public static final String PERMISSION_BUTTON             = "button";          //按钮


	  
	  
	  /*******************************出诊时间****************************************/
	  public static final String TIME_AM = "AM";                //
	  public static final String TIME_PM = "PM";
	  public static final String TIME_DAY = "DAY";
	  public static final String TIME_EVE = "EVE";
	  public static final String TIME_NIGHT = "NIGHT";
	  public static final String TIME_ALL_DAY = "ALLDAY";
	  public static final String TIME_NO_VISITS = "NOVISITS";
	  
	  public static final String TIME_AM_STR = "上午";                //
	  public static final String TIME_PM_STR = "下午";
	  public static final String TIME_DAY_STR = "白天";
	  public static final String TIME_EVE_STR = "";
	  public static final String TIME_NIGHT_STR = "晚上";
	  public static final String TIME_ALL_DAY_STR = "全天";
	  public static final String TIME_NO_VISITS_STR = "不出诊";
	
	  public static List<String> visitsTimeList = new ArrayList<String>();
	  static {
		  visitsTimeList.add(TIME_AM_STR);
		  visitsTimeList.add(TIME_PM_STR);
		  visitsTimeList.add(TIME_DAY_STR);
		  visitsTimeList.add(TIME_NIGHT_STR);
		  visitsTimeList.add(TIME_ALL_DAY_STR);
		  visitsTimeList.add(TIME_NO_VISITS_STR);
	  }
	  
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
  /********************************************Roles constants*********************************************************************/
	  
	  
	  
	  
	
  /********************************************Act constants*********************************************************************/
	
	  /****************************就诊类型**************************************/
	    /**
	     * 挂号
	     */
	    public static final String CLINIC            = "CLINIC";                     
		/**
	     * 复诊
	     */
		public static final String AGAINCLINIC       = "AGAINCLINIC";                 
		/**
	     * 转号
	     */
		public static final String TRANSFERCLINIC    = "TRANSFERCLINIC";             
		/**
		 * 转科
		 */
		public static final String PATIENTTRANSFER   = "PATIENTTRANSFER";            
		/**
		 * 入院
		 */
		public static final String HOSPITALIZED      = "HOSPITALIZED";         
		
		/**
		 * 入科
		 */
		public static final String INDEPARTMENT = "INDEPARTMENT" ;
		
		/**
		 * 门诊接诊
		 */
		public static final String OUTPATIENTADMIT = "OUTPATIENTADMIT";
		
		/**
		 * 住院接诊
		 */
		public static final String INPATIENTADMIT = "INPATIENTADMIT";
		
   /***************************************************************电子病历*******************************************************/
		/**
		 * 企业术语字典
		 */
		public static final String WRIT_TYPE_DICT = "WritTypeDict"; //模板文书类型
		
		
		public static final String EMR_HOSPITAL = "HOSPITAL";          //全院
		public static final String EMR_DEPARTMENT = "DEPARTMENT";      //科室
		public static final String EMR_WORKGROUP = "WORKGROUP";        //病区
		public static final String EMR_PSN = "PSN";                    //个人
		
	    //---------------------------------------------
		// 审核范围，用来处理获取模板待审核列表
		//---------------------------------------------
		public static String AUD_HOSPITAL = "AUD_HOSPITAL";  //全院审核范围
		public static String AUD_DEPTMENT = "AUD_DEPTMENT";  //科室审核范围
		public static String AUD_HOSPITAl_ALL = "AUD_HOSPITAl_ALL";  //全院模板科室模板审核范围
		
		//---------------------------------------------
		//病程记录，Document的第三级业务编码
		//---------------------------------------------
		public static String MEDICALREC = "MEDICALREC";	
		
		//---------------------------------------------
		//电子病历作者失效，这个状态码会在
		//RimCoreActPrtcptns中的statusCode体现
		//电子病历在书写过程中有可能会改变作者
		//---------------------------------------------
		public static String AUT_ACTIVE = "AUT_ACTIVE"; //有效
		public static String AUT_INVALID = "AUT_INVALID"; //无效
		
		
		
		//-----------------------电子病历监控代码--------------------------------
		/**
		 * 首次病程记录
		 */
		public static String FIRST_MEDPRO = "C"; 
		
	
	
	
  /********************************************system constants*********************************************************************/
  //JNDI Properties related.
  public static final String JAVANAMINGFACTORY        = "weblogic.jndi.WLInitialContextFactory"; 
  public static final String JAVANAMINGPROVIDERURL    = "t3://192.168.1.251:7001";   
  public static final String ETSJNDIPRINCIPAL         = "sysadmin";   
  public static final String ETSJNDICREDENTIALS       = "sysadmin"; 
  public static final String userid                   = "weblogic"; 
  public static final String password                 = "oracle11g"; 
  public static final String CLIENTMODE               = "local";    
  public static final String ORG_ENTERPRISE_ROOT      = "9.202020.5.100";
  public static final String ORG_ENTERPRISE_EXTN      = "ORG_TRAINING_ENT-EXTN";

  public static final String ORG_FACILITY_ROOT        = "9.202020.5.200";
  public static final String ORG_FACILITY_EXTN        = "ORG_TRAINING_FAC";
  public static final String ORG_BU_ROOT              = "9.202020.5.300";
  public static final String ORG_BU_EXTN              = "ORG_TRAINING_BU-EXTN";
  public static final String ORG_PS_ROOT              = "9.202020.5.400";
  public static final String ORG_PS_EXTN              = "ORG_TRAINING_PS-EXTN";
  public static final String ASSIGNED_ROLE_ROOT        = "9.202020.5.1.210";
  public static final String ASSIGNED_ROLE_EXTN        = "ROLE_TRAINING_EXTN";
  public static final String ASSIGNED_ACT_ROOT        = "9.202020.5.1.215";
  public static final String ASSIGNED_ACT_EXTN        = "ACT_TRAINING_EXTN";
  
  public static final String CLASS_CODE               = "INVSTG";
  public static final String MOOD_CODE                = "EVN";
  public static final String ORG_CODINGSCHEME_NAME    = "Supplemental";
  //Enterprise Assigned entity code
  public static final String ENTERPRISE_ENT_CODE      = "000172";
  //Facility assigned entity code
  public static final String FACILITY_ENT_CODE        = "000173";
  //Bussiness Unit assigned entity code
  public static final String BUSINESS_ENT_CODE        = "000174";
  //Practicesetting assigned entity code
  public static final String PS_ENT_CODE              = "000176";
  //Org Desc
  public static final String ORG_DESC                 = "ORG_TRAINING_";
  //Org Name
  public static final String ORG_LONG_NAME            = "-ORG";
  public static final String ORG_SHORT_NAME           = "-org";
  public static final String ORG_LONG_NAME_USE        = "L";
  public static final String ORG_SHORT_NAME_USE       = "AB";
  //Address
  public static final String ORG_ADDR_TYPE_COUNTRY    = "US";
  public static final String ORG_ADDR_TYPE_STATE      = "AZ";
  public static final String ORG_ADDR_TYPE_CITY       = "Fountain Hills";
  public static final String ORG_ADDR_TYPE_ZIP        = "85068";
  public static final String ORG_ADDR_USE_CODE        =  "WP";
  
  //Merge Related
  public static final String MERGE1EXTN = "MERGE_1";
  
  //hl7 dataType空串处理
  public static final String NULLSTR = "<Null:NullFlavor: NI>";
  
}
